﻿<!-- #include file="Admin_Onlogin.asp" -->
<%
Dim sqlAuth, rsAuth
sqlAuth = "Select AuthID From Admin_Auth Where href='UploadFile/Upload' Order By sort Asc,AuthID Asc"
Call Exec(rsAuth,sqlAuth,2)
If rsAuth.BOF And rsAuth.EOF Then
	CheckPurview 0,0
Else
	CheckPurview rsAuth(0),0
End If
rsAuth.Close
Set rsAuth = Nothing
ChannelID = Code_CLng(Trim(Request.QueryString("channelid")))
filetype = Code_CLng(Trim(Request.QueryString("filetype")))
classid=Code_CLng(Trim(Request.QueryString("classid")))
dim cid:cid=Code_CLng(Trim(Request.QueryString("cid")))
dim compress:compress=Code_CLng(Trim(Request.QueryString("compress")))
dim limit:limit=Code_CLng(Trim(Request.QueryString("limit")))
dim up_max_width:up_max_width=300
dim up_max_height:up_max_height=300
if limit>10 or limit=0 then limit=1
If ChannelID = "" Then ChannelID = 0
If ChannelID > 0 Then
	Call GetChannel(ChannelID)
	MaxFileSize=ChannelMaxFileSize
	select case filetype
		case "2":uptype=ChannelUpFileType(3)
		case "3":uptype=ChannelUpFileType(2)
		case "4":uptype="gif|jpg|png|bmp|flv|mp4|swf|mp3|rar|zip|tar|gz|7z|bz2|cab|iso|apk|doc|docx|xls|xlsx|ppt|pptx|pdf|txt|md|xml"
		case "5":uptype=ChannelUpFileType(1)
		case else:uptype=ChannelUpFileType(0)
	end select
	channelid="&channelid="&ChannelID&""
Else
	MaxFileSize=UploadSetting(21)
	select case filetype
		case "2":uptype=UploadSetting(23)
		case "3":uptype=UploadSetting(22)
		case "4":uptype="gif|jpg|png|bmp|flv|mp4|swf|mp3|rar|zip|tar|gz|7z|bz2|cab|iso|apk|doc|docx|xls|xlsx|ppt|pptx|pdf|txt|md|xml"
		case "5":uptype="swf"
		case else:uptype=UploadSetting(3)
	end select
End If
Response.Write "<!DOCTYPE html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<meta http-equiv=""Content-Type"" content=""text/html;charset=UTF-8"">" & vbCrLf
Response.Write "<title>文件上传</title>" & vbCrLf
Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../Plugins/uploader/css/webuploader.css"" />" & vbCrLf
Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""../Plugins/uploader/css/style.css"" />" & vbCrLf
Response.Write "<script type='text/javascript' src=""../../Dialog/main.js""></script>" & vbCrLf
Response.Write "<script type='text/javascript' src=""../Js/jquery-migrate-1.1.0.min.js""></script>" & vbCrLf
Response.Write "<script type='text/javascript' src=""../Plugins/tips/jquery.tips.js""></script>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "    <div id=""wrapper"">" & vbCrLf
Response.Write "        <div id=""container"">" & vbCrLf
Response.Write "            <div id=""uploader"">" & vbCrLf
Response.Write "                <div class=""statusBar"" style=""display:none;"">" & vbCrLf
Response.Write "                    <div class=""progress"">" & vbCrLf
Response.Write "                        <span class=""text"">0%</span>" & vbCrLf
Response.Write "                        <span class=""percentage""></span>" & vbCrLf
Response.Write "                    </div><div class=""info""></div>" & vbCrLf
Response.Write "                    <div class=""btns"">" & vbCrLf
Response.Write "                        <div id=""filePicker2""></div><div class=""uploadBtn"">开始上传</div>" & vbCrLf
Response.Write "                    </div>" & vbCrLf
Response.Write "                </div>" & vbCrLf
Response.Write "                <div class=""queueList"">" & vbCrLf
Response.Write "                    <div id=""dndArea"" class=""placeholder"">" & vbCrLf
Response.Write "                        <div id=""filePicker""></div>" & vbCrLf
Response.Write "                        <p>或将文件拖到这里，最多上传<span id=""minlimit""></span>个文件</p>" & vbCrLf
Response.Write "                        <div id=""tips""></div>" & vbCrLf
Response.Write "                    </div>" & vbCrLf
Response.Write "                </div>" & vbCrLf
Response.Write "            </div>" & vbCrLf
Response.Write "            <div id=""filelist""></div>" & vbCrLf
Response.Write "        </div>" & vbCrLf
Response.Write "    </div>" & vbCrLf
Response.Write "    <script>" & vbCrLf
Response.Write "	var webroot="""&InstallDir&AdminFolder&""";" & vbCrLf
Response.Write "	var up_max="&clng(MaxFileSize/1024)&";" & vbCrLf
Response.Write "	var up_type="""&replace(uptype,"|",",")&""";" & vbCrLf
Response.Write "	var up_limit="&limit&";" & vbCrLf
Response.Write "	var up_server=""Upload.asp?action=swf&filetype="&filetype&channelid&"&cid="&cid&"&classid="&classid&""";" & vbCrLf
Response.Write "	var up_max_width="&up_max_width&";" & vbCrLf
Response.Write "	var up_max_height="&up_max_height&";" & vbCrLf
Response.Write "	var up_compress="&compress&";" & vbCrLf
Response.Write "    </script>" & vbCrLf
Response.Write "    <script src=""../Plugins/uploader/js/webuploader.js""></script>" & vbCrLf
Response.Write "    <script src=""../Plugins/uploader/js/upload.js""></script>" & vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
%>